Win: Add no console by default and attach later - #964
Open
yuxiaomao wants to merge 3 commits into
Open
Conversation
Collaborator
Author
|
Another pb when the debugger is attached (and as we don't do createConsole to keep the trace inside the debugger) is that now every |
tobil4sk
reviewed
Jul 28, 2026
| return 0; | ||
| } | ||
|
|
||
| #ifdef HL_WIN |
Member
There was a problem hiding this comment.
Maybe it would be good to have && !defined(_CONSOLE), so people can still compile it for the console subsystem. This would match hlc_main.c:
Line 178 in 1fa6e80
Collaborator
Author
There was a problem hiding this comment.
Yes we can keep the same (but it seems still compile when choosing console subsystem).
HL_XBS can use the same too because I copied the function from HL_XBS, so I put the same condition here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems that sometimes for a game release, we don't want the cmd window pop-up. This PR:
wWinMainin main.c so one can compile withsubsystem:windowsui_create_console,ui_attach_consoleto enable the console when we need it (API in haxe)ReleaseDX12AgilityThe downside (?) is that the console window will look like a normal window instead of a cmd window.
Haxe side API:
#if (hl_ver >= version("1.16.0")) @:hlNative("?ui", "ui_create_console") public static function createConsole():Bool { return false; } @:hlNative("?ui", "ui_attach_console") public static function attachConsole(pid:Int):Bool { return false; } #endFor a better experience with debugger I think the expected usage is :